/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.controller;
import com.techshop.model.TechnicalSpecifications;
import com.techshop.service.TechnicalSpecificationsService;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
/**
 *
 * @author hai
 */
@ManagedBean(name = "technicalSpecificationsController")
@SessionScoped
public class TechnicalSpecificationsController extends AbstractController{
    private TechnicalSpecifications ts;

    public TechnicalSpecifications getTs() {
        return ts;
    }

    public void setTs(TechnicalSpecifications ts) {
        this.ts = ts;
    }
    private List<TechnicalSpecifications> listTechnicalSpecifications;
    @ManagedProperty(value = "#{technicalSpecificationsService}")
    private TechnicalSpecificationsService technicalSpecificationsService;
    public TechnicalSpecificationsService getTechnicalSpecificationsService() {
        return technicalSpecificationsService;
    }

    public void setTechnicalSpecificationsService(TechnicalSpecificationsService technicalSpecificationsService) {
        this.technicalSpecificationsService = technicalSpecificationsService;
    }

    public List<TechnicalSpecifications> getListTechnicalSpecifications() {
        
        setListTechnicalSpecifications(getTechnicalSpecificationsService().findAll());
        
        return listTechnicalSpecifications;
    }

    public void setListTechnicalSpecifications(List<TechnicalSpecifications> listTechnicalSpecifications) {
        this.listTechnicalSpecifications = listTechnicalSpecifications;
    }
    public TechnicalSpecifications getTSByID(int tsID)
    {
        return getTechnicalSpecificationsService().getByID(tsID);
    }

    
}

